x86/hvm/rtc: don't run the vpt timer when !REG_B.PIE
authorTim Deegan <tim@xen.org>
Tue, 25 Feb 2014 08:26:45 +0000 (09:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 25 Feb 2014 08:26:45 +0000 (09:26 +0100)
commit4c15a82f034c9c2213a18b6320834f3906d00ba9
tree68a7c17f9f81725904465fd789d278d0e46c4f1c
parentd6ac84ca0db28b99073d4364815e0f71600c5780
x86/hvm/rtc: don't run the vpt timer when !REG_B.PIE

If the guest has not asked for interrupts, don't run the vpt timer
to generate them.  This is a prerequisite for a patch to simplify how
the vpt interacts with the RTC, and also gets rid of a timer series in
Xen in a case where it's unlikely to be needed.

Instead, calculate the correct value for REG_C.PF whenever REG_C is
read or PIE is enabled.  This allow a guest to poll for the PF bit
while not asking for actual timer interrupts.  Such a guest would no
longer get the benefit of the vpt's timer modes.

Signed-off-by: Tim Deegan <tim@xen.org>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/rtc.c
xen/include/asm-x86/hvm/vpt.h